﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;

namespace Core
{
    public static partial class system
    {
        public static dynamic editSystemSettings(string title, string copyright,
            bool openAccess, bool openOutsideReg, bool openOutsideSendMsg, bool openDiscuss, bool openOutsideDiscuss)
        {
            var sql = new Sql.SqlDataContext();
            var s = sql.Settings.First();
            s.title = title;
            s.copyright = copyright;
            s.openAccess = openAccess;
            s.openDiscuss = openDiscuss;
            s.openOutsideDiscuss = openOutsideDiscuss;
            s.openOutsideReg = openOutsideReg;
            s.openOutsideSendMsg = openOutsideSendMsg;
            sql.SubmitChanges();
            return new
            {
                success = true
            };
        }
    }
}
